Group Assignment
Individual Assignment
Table of Contents
Week 8 Work Plan
Hero Shot
Group Assignment Result
Basic Electronics Concepts
Resistors
A resistor is a fundamental electronic component that restricts or limits the flow of electric current in a circuit. It's designed to introduce a specific amount of resistance into the circuit, which is measured in ohms (Ω).
An ohm is the resistance that occurs when a current of one ampere (A) passes through a resistor with a one volt (V) drop across its terminals. The current is proportional to the voltage across the terminal ends. This ratio is represented by Ohm’s law.
Current Limiting | Resistors are commonly used to limit the amount of current flowing through a particular part of a circuit, thus protecting sensitive components from damage due to excessive current. |
Voltage Division | They are used in voltage dividers to create specific voltage levels within a circuit. |
Adjustment | In some circuits, resistors are used to fine-tune or adjust the voltage or current levels. |
Signal Conditioning | Resistors are often used in signal conditioning circuits to modify signal levels, impedance matching, and filtering. |
Temperature Sensing | Certain types of resistors, such as thermistors, change resistance with changes in temperature, making them useful for temperature sensing applications. |
Pull-up and Pull-down Resistors | These are used in digital circuits to ensure a well-defined logic level when a signal is not actively driven by a device. |
Resistor Color Code
SMD Resistor Code
Pull-up and Pull-down Resistors
A pull-up resistor is connected between the signal line and the positive supply voltage, usually VCC.
- When the switch or input device is open (not pressed or activated), the pull-up resistor effectively "pulls up" the voltage level of the signal line to VCC.
- When the switch or input device is closed (pressed or activated), it provides a low-resistance path to ground, pulling the voltage level of the signal line close to ground.
- Pull-up resistors ensure that the signal line remains at a high logic level (usually interpreted as '1' in digital systems) when the switch or input device is not actively driving it.
A pull-down resistor is connected between the signal line and ground (GND).
- When the switch or input device is open, the pull-down resistor effectively "pulls down" the voltage level of the signal line to ground.
- When the switch or input device is closed, it provides a low-resistance path to the positive supply voltage, pulling the voltage level of the signal line close to VCC.
- Pull-down resistors ensure that the signal line remains at a low logic level (usually interpreted as '0' in digital systems) when the switch or input device is not actively driving it.
Capacitors
A capacitor is an electronic component that stores electrical energy temporarily. Think of it as a small, rechargeable battery for electricity. It's made of two conductive plates separated by an insulating material called a dielectric.
When you connect a capacitor to a power source, such as a battery or an electrical outlet, it charges up by accumulating electric charge on its plates. Once charged, the capacitor can hold onto this energy until it's needed.
- It's measured in Farad and normal use ranges are Pico Farad(pF), Nano Farad (nF), Micro Farad (μF or uF) ranges.
Filtering | They smooth out fluctuations in voltage, ensuring a more stable power supply. |
Timing | Capacitors can control the timing of circuits, for instance, in oscillators and timing circuits. |
Coupling | They allow AC signals to pass while blocking DC signals, useful for coupling stages of amplifiers. |
Energy Storage | Capacitors can store energy, used in applications such as flash photography, where a sudden burst of energy is required. |
Clamp Meter
A clamp meter, also known as a clamp-on ammeter or current clamp, is a specialized type of electrical testing instrument used to measure electric current in a circuit without the need to disconnect wires or make direct contact with them. It's particularly useful for measuring current in large or high-voltage circuits where traditional methods may be impractical or unsafe.
Mixed Signal Oscilloscope
A mixed signal oscilloscope (MSO) is a type of digital storage oscilloscope that can display and compare analog and digital signals. It has input channels for both types of signals, with analog signals displayed as voltage levels that vary continuously over time, and digital channels measuring logic values (0 or 1).
- MSOs can simultaneously analyze analog and digital signals to establish causal relationships between the various areas of a device's electronics. They are used for troubleshooting electrical anomalies, measuring parametric values, and monitoring cause and effect relationships between signals.
- MSOs have powerful digital triggering and high-resolution acquisition capability, as well as analysis tools that can help quickly debug digital circuits. The digital channels are displayed individually and/or grouped together in a bus display, all time correlated with the analog channels around the same trigger point.
Thermal Camera
A thermal camera, also known as an infrared camera or thermographic camera, is a type of imaging device that captures and visualizes the infrared radiation emitted by objects and surfaces. Unlike conventional cameras, which rely on visible light to create images, thermal cameras detect heat signatures emitted by objects based on their temperature.
SAM D11C
The SAM D11C is a microcontroller from Microchip Technology, which is part of their SAM D11 family of ARM Cortex-M0+ based microcontrollers. These microcontrollers are designed for low-power applications and offer a balance between performance, power efficiency, and peripheral integration.
- The SAM D11C is based on the ARM Cortex-M0+ processor core, which is a low-power, 32-bit RISC processor designed for embedded applications. It offers a good balance between performance and power efficiency, making it suitable for a wide range of applications.
- The SAM D11C microcontroller includes a variety of on-chip peripherals to support different types of applications. These peripherals may include analog-to-digital converters (ADCs), digital-to-analog converters (DACs), serial communication interfaces (UART, SPI, I2C), timers/counters, pulse-width modulation (PWM) controllers, and more.
- The SAM D11C is designed for low-power operation, making it suitable for battery-powered or energy-efficient applications. It includes features such as multiple low-power modes, sleep modes, and power gating to minimize power consumption during idle periods.
- The SAM D11C microcontroller typically includes flash memory for program storage and SRAM for data storage. The amount of memory may vary depending on the specific variant of the microcontroller.
PCB Design Nomenclature
PCB | Stands for Printed Circuit Board, the physical board onto which electronic components are mounted and interconnected. |
Schematic | A diagrammatic representation of the electrical connections and components in a circuit. |
Components | Electronic parts such as resistors, capacitors, integrated circuits (ICs), connectors, etc. |
Pads | Metalized areas on the PCB surface for soldering components or making electrical connections. |
Traces | Copper conductive paths on the PCB connecting various components and pads. |
Vias | Plated-through holes connecting traces on different layers of the PCB. |
Silkscreen | Printed text, symbols, or markings on the PCB surface for component placement, orientation, and identification. |
Footprint | The physical layout of a component on the PCB, including pad locations and dimensions. |
Net | A named electrical connection between two or more points on the PCB. |
Layers | The individual copper or substrate layers that make up the PCB, typically including signal layers, power planes, and ground planes. |
Routing | The process of defining and creating the paths for traces on the PCB. |
DRC (Design Rule Check) | Automated checks performed by PCB design software to ensure the design meets specified design rules and constraints. |
Gerber files | Standard file format used to describe the PCB design to PCB manufacturers, including information on copper layers, silkscreen, solder mask, etc. |
BOM (Bill of Materials) | A list of all components required for the assembly of the PCB, including part numbers, quantities, and references to the schematic. |
IPC standards | Industry standards published by the Association Connecting Electronics Industries (IPC) that define guidelines for PCB design, manufacturing, and assembly. |
Copper Weight | The thickness of the copper layers on the PCB, typically measured in ounces per square foot (oz/ft²) or micrometers (µm). |
Solder Mask | A protective layer is applied over the copper traces to prevent unintentional solder bridges and oxidation. |
KiCad
KiCad is a free open-source software suite for electronic design automation (EDA). It is used for designing schematics of electronic circuits and printed circuit boards (PCBs).
KiCad is a comprehensive toolset that facilitates the process of designing professional grade PCBs. The suite includes a project manager and four main independent software tools:
- Eeschema: A schematic capture editor.
- Pcbnew: A PCB layout program.
- Gerbview: A Gerber file viewer.
- Bitmap2Component: A converter from BMP images to photo-realistic images for use in 3D view.
The software also supports a wide range of design formats, making it a versatile choice for different design needs. Its open-source nature means it is continually evolving and improving, thanks to the contributions of its user community.
I found that learning and utilising hotkeys in KiCad can significantly enhance productivity by reducing the time spent navigating menus and performing repetitive tasks.
Fab Library Installation
Adding Components to the Schematic
SAMD11C Eagle Board Schematic
Edit Values of Components
LED Series Resistor Calculator
Bill of Materials [BOM]
S.NO | Reference | Value | Footprint | Qty |
1 | C1 | 1uF | fab:C_1206 | 1 |
2 | C2 | 100nF | fab:C_1206 | 1 |
3 | D1 | LED_1206 | fab:LED_1206 | 1 |
4 | D3 | LED_RGB_CreeLED_PLCC4 | fab:LED_RGB_CreeLED_CLV1A-FKB | 1 |
5 | J1 | USB_A | fab:ProshPlay-Type-C-breakout-board | 1 |
6 | J2 | Conn_PinHeader_SWD_2x02_P2.54mm_Vertical_SMD | fab:PinHeader_2x02_P2.54mm_Vertical_SMD | 1 |
7 | J4,J5 | Conn_PinHeader_2x03_P2.54mm_Vertical_SMD | fab:PinHeader_2x03_P2.54mm_Vertical_SMD | 2 |
8 | R1 | 499 Ohm | fab:R_1206 | 1 |
9 | R2 | 5K | fab:R_1206 | 1 |
10 | R3,R4,R5 | 50 Ohm | fab:R_1206 | 3 |
11 | SW2 | Switch_Tactile_Omron | fab:Button_Omron_B3SN_6.0x6.0mm | 1 |
12 | U1 | Microcontroller_ATSAMD11C14A-SSUT | fab:SOIC-14_3.9x8.7mm_P1.27mm | 1 |
13 | U2 | Regulator_Linear_3.3V_100mA_TexasInstruments | fab:SOT-23-3 | 1 |
PCB Routing
Interactive BOM Plugin
The Interactive BOM (Bill of Materials) plugin in KiCad is a powerful tool that helps users manage and customize their bill of materials directly within the KiCad environment. The plugin enhances the traditional BOM generation process by providing an interactive interface for viewing, editing, and annotating components in the BOM.
AutoRouting Plugin
KiCad does offer an integrated auto-router tool called the "Interactive Router". This feature allows users to automatically route connections between components on a PCB layout.
Gerber File Export
🚨 Gerber 2 PNG
GerberViewer is an open-source web application that serves as a versatile tool for viewing Gerber files and streamlining the conversion of Gerber files into PNG images. It was developed by web developer Mr. Midlaj of Superfablab Kerala.
Features
The tool offers a range of features for users, including the capability to convert Gerber files to PNG images with ease. It supports various Gerber file formats, ensuring compatibility with different design specifications. The web interface is intuitive and responsive, providing users with a seamless experience throughout the conversion process. With a straightforward conversion procedure, users can quickly navigate through the steps required to obtain their desired PNG images. Furthermore, the tool allows for the instant download of converted PNG images, enhancing efficiency and convenience for users.
🚨 Double Layer PCB
Software [ Mods CE ] & Machining Phase
🚨 FabLab Inventory
FabStash is a web-based app developed by superfablab Kerala for maintaining the fab inventory.
Soldering
Interactive BOM
Programming the Eagle Board
Eagle Board RGB LED Code
const int redPin = 5;
const int greenPin = 8;
const int bluePin = 9;
void setup() {
// Initialize the RGB LED pins as OUTPUT
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
void loop() {
// Example: Smoothly transition through RGB colors
// Red
setColor(255, 0, 0); // Set full intensity red
delay(1000); // Wait for 1 second
// Green
setColor(0, 255, 0); // Set full intensity green
delay(1000); // Wait for 1 second
// Blue
setColor(0, 0, 255); // Set full intensity blue
delay(1000); // Wait for 1 second
}
// Function to set the color of the RGB LED
void setColor(int redValue, int greenValue, int blueValue) {
// Map the color values (0-255) to the PWM range (0-255)
analogWrite(redPin, redValue);
analogWrite(greenPin, greenValue);
analogWrite(bluePin, blueValue);
}
Different Design Workflow
EasyEDA
EasyEDA is a free, zero-install, web and cloud-based EDA (Electronic Design Automation) tool, integrating powerful schematic capture, mixed-mode circuit simulation, and PCB layout in a seamless cross-platform browser environment. It is suitable for users who need to design and simulate electronic circuits and layouts.
3D View of the PCB
ESP32 Custom Board Schematic
ID | Name | Designator | Footprint | Quantity | Supplier Part |
1 | 100nF | C1,C2,C3,C4,C5,C10,C11,C12,C13 | C0402 | 9 | C1525 |
2 | 22uF | C6 | C0805 | 1 | C602037 |
3 | 10uF | C7,C8 | C0402 | 2 | C315248 |
4 | 4.7uF | C9 | C0402 | 1 | C368809 |
5 | LESD5D5.0CT1G | D1,D2,D3 | SOD-523_L1.2-W0.8-LS1.6-BI | 3 | C383211 |
6 | X6511WV-17H-C30D60 | H1,H2 | HDR-TH_17P-P2.54-V-M | 2 | C725949 |
7 | LED-0805_G | LED1 | LED0805_GREEN | 1 | C84260 |
8 | LED-0805_R | LED2 | LED0805_RED | 1 | C72037 |
9 | Header-Female-2.54_1x3 | P3 | HDR-TH_3P-P2.54-V-F | 1 | C146243 |
10 | SS8050-G | Q1,Q2 | SOT-23-3_L2.9-W1.3-P1.90-LS2.4-BR | 2 | C164886 |
11 | 2N7002T-7-F | Q3,Q4 | SOT-523-3_L1.6-W0.8-P1.00-LS1.6-BR | 2 | C139445 |
12 | 0Ω | R1,R2 | R0402 | 2 | C17168 |
13 | 10kΩ | R3,R4,R5,R6,R14 | R0402 | 5 | C25744 |
14 | 22.1kΩ | R7 | R0402 | 1 | C43473 |
15 | 47.5kΩ | R8 | R0402 | 1 | C25896 |
16 | 1kΩ | R9,R15 | R0402 | 2 | C11702 |
17 | 5.1kΩ | R10 | R0402 | 1 | C25905 |
18 | 22Ω | R11,R12 | R0402 | 2 | C25092 |
19 | 560Ω | R13 | R0402 | 1 | C25905 |
20 | PTS645SH50SMTR92LFS | SW1,SW2 | KEY-SMD_4P-L6.0-W6.0-P4.50-LS9.0 | 2 | C221869 |
21 | ESP32-WROOM-32E(8MB) | U1 | WIFI-SMD_ESP32-WROOM-32E | 1 | C701342 |
22 | CP2102N-A02-GQFN28R | U2 | QFN-28_L5.0-W5.0-P0.50-TL-EP3.3 | 1 | C964632 |
23 | AMS1117-3.3_C347222 | U3 | SOT-223-4_L6.5-W3.5-P2.30-LS7.0-BR | 1 | C347222 |
24 | 2-Pin-Male-Header-2.54mm | U4 | 2-PIN-MALE-HEADER-2.54MM | 1 |
Simulation
Tinkercad
Tinkercad Circuits is a free web app that allows users to simulate digital and analog electronics. It's popular with students, hobbyists, and makers. The simulator allows users to program and test circuits in a virtual environment, making it easier to prototype new ideas before building them in the real world.
BOM
Schematic of the Bionic Arm
Bionic Arm Code
#include <Servo.h>
// Define the number of flex sensors and servo motors
const int numFlexSensors = 5;
const int numServoMotors = 5;
// Array to store flex sensor pin numbers
const int flexPins[numFlexSensors] = {A0, A1, A2, A3, A4};
// Array to store servo motor objects
Servo servos[numServoMotors];
void setup() {
// Initialize serial communication
Serial.begin(9600);
// Attach servo motors to corresponding pins
for (int i = 0; i < numServoMotors; i++) {
servos[i].attach(i + 2); // Pins 2 to 6
}
}
void loop() {
// Array to store flex sensor readings
int flexValues[numFlexSensors];
// Read the values from the flex sensors
for (int i = 0; i < numFlexSensors; i++) {
flexValues[i] = analogRead(flexPins[i]);
}
// Map the flex sensor readings to servo angles (0-180 degrees)
for (int i = 0; i < numServoMotors; i++) {
int angle = map(flexValues[i], 0, 1023, 0, 180);
servos[i].write(angle);
}
// Print flex sensor readings for debugging
for (int i = 0; i < numFlexSensors; i++) {
Serial.print("Flex Sensor ");
Serial.print(i + 1);
Serial.print(": ");
Serial.println(flexValues[i]);
}
// Delay for stability
delay(100);
}
Wokwi
Wokwi is an online platform that provides a virtual hardware simulation environment for electronics enthusiasts, hobbyists, educators, and students. It allows users to design, simulate, and test electronic circuits and Arduino projects in a web browser without the need for physical components or hardware.
Joystick-Servo Code
#include <ESP32Servo.h>
#define JOYSTICK_X_PIN 34 // Analog pin for X-axis of joystick
#define JOYSTICK_Y_PIN 35 // Analog pin for Y-axis of joystick
#define SERVO_PIN 25 // Pin to which servo motor is connected
Servo servoMotor; // Create a servo object
void setup() {
Serial.begin(115200);
servoMotor.attach(SERVO_PIN); // Attaching the servo to the pin
}
void loop() {
int xValue = analogRead(JOYSTICK_X_PIN); // Read the X-axis value of joystick
int yValue = analogRead(JOYSTICK_Y_PIN); // Read the Y-axis value of joystick
// Map the joystick values (0-4095) to servo angle range (0-180)
int angle = map(xValue, 0, 4095, 0, 180);
// Move the servo to the mapped angle
servoMotor.write(angle);
// Print out the joystick values and mapped angle
Serial.print("X-axis: ");
Serial.print(xValue);
Serial.print(", Y-axis: ");
Serial.print(yValue);
Serial.print(", Mapped Angle: ");
Serial.println(angle);
delay(100); // Delay for smoother control
}
Resources and Downloads
📁 Type C Breakout Board Footprint
📁 ESP32 Custom Board Schematic